How to display multiple attributes in single column?

Within a module, I want to display several attribute values within a single column. The following code displays the desired attribtues in the desired format, except that for EACH object it is displaying the attribute values for ALL the objects in the module.
Object o
string s
for o in current Module do {

s = probeRichAttr_(o,"Object Text", false)
if ( plainText(s) != "" ) displayRich s

s = probeRichAttr_(o,"Imported Requirement Number", false)
s = "{\\b Business Requirement ID: }" s
if ( plainText(s) != "" ) displayRich s

s = (identifier o)
s = "{\\b DOORS ID: }" s
if ( plainText(s) != "" ) displayRich s

s = " "
if ( plainText(s) != "" ) displayRich s
}
How to control it so that it displays only the three attribute values pertinent to each object?

Have tried many variations, but am losing too much time trying to figure it out. Any help would be appreciated, thank you!
karringordon - Tue Sep 14 12:34:31 EDT 2010

Re: How to display multiple attributes in single column?
dofstead - Tue Sep 14 13:17:30 EDT 2010

Try removing the "for o in current Module do {" loop. And use "obj" to retrieve attribute data:

Object o
string s
s = probeRichAttr_(obj,"Object Text", false)
if ( plainText(s) != "" ) displayRich s

s = probeRichAttr_(obj,"Imported Requirement Number", false)
s = "{\\b Business Requirement ID: }" s
if ( plainText(s) != "" ) displayRich s

s = (identifier obj)
s = "{\\b DOORS ID: }" s
if ( plainText(s) != "" ) displayRich s

s = " "
if ( plainText(s) != "" ) displayRich s

Question : Is it better to use Buffers instead of strings? My concern is that any resizing of window, etc., causes the layout DXL to recreate the column.. perhaps many many times, and thus DOORS' poor memory management with strings could be a problem.

Maybe the string issue could be somewhat alleviated by using attribute DXL instead of Layout DXL.

Dave

Re: How to display multiple attributes in single column?
karringordon - Tue Sep 14 13:45:30 EDT 2010

Perfect Dave, thanks so much! I was making it much too difficult! And yes, I will convert it to attribute dxl to improve performance. Thanks again for your speedy solution, Karrin